<template>
	<view class="mainpadding">
		<view v-for="item in list" :key="item.id">
			<view class="xiaohui strongtext">{{item.name}}</view>
			<view class="flexbetween margin_top" v-for="ite in item.childlist" :key="ite.id" @click="tztxjb(ite)">
				<view class="xiaohei ershiba">{{ite.name}}</view>
				<u-icon name="arrow-right"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad() {
			this.init()
		},
		methods: {
			init() {
				httpRequest.request('/api/index/reportType', 'GET', {
				}, false, false, true).then(res => {
					
					this.list = res.data
					console.log(this.list);
				})
			},
			// 跳转填写举报
			tztxjb(item){
				uni.navigateTo({
					url:'/pages_homepage/tianxiejubao?msg='+encodeURIComponent(JSON.stringify(item))
				})
			}
		}
	}
</script>

<style>

</style>
